#!/bin/sh

# aptitude needs the apt xapian index stuff now, so make sure it at
# least exists.

set -e

mandir=@MEMO_PREFIX@@MEMO_SUB_PREFIX@/share/man

if [ "$1" = "configure" ]
then
  slaves="--slave $mandir/man8/aptitude.8@MEMO_MANPAGE_SUFFIX@ aptitude.8@MEMO_MANPAGE_SUFFIX@ $mandir/man8/aptitude-curses.8@MEMO_MANPAGE_SUFFIX@"
  for lang in de es gl it ja nl ru ; do
    slaves="$slaves --slave $mandir/$lang/man8/aptitude.8@MEMO_MANPAGE_SUFFIX@ aptitude.$lang.8@MEMO_MANPAGE_SUFFIX@ $mandir/$lang/man8/aptitude-curses.8@MEMO_MANPAGE_SUFFIX@"
  done
  update-alternatives \
    --install @MEMO_PREFIX@@MEMO_SUB_PREFIX@/bin/aptitude aptitude @MEMO_PREFIX@@MEMO_SUB_PREFIX@/bin/aptitude-curses 30 $slaves
fi

#DEBHELPER#
